package com.cn.yang.servlet.mainPage;

import com.alibaba.fastjson.JSONObject;
import com.cn.yang.model.mainPage.HeadLinkModel;
import com.cn.yang.service.MainPageService;
import com.cn.yang.service.impl.MainPageServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/back/mainPage/updateIsshowHeadLink")
public class UpdateIsshowHeadLinkServlet extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        Integer id = Integer.valueOf(req.getParameter("id"));
        Integer isshow = Integer.valueOf(req.getParameter("isshow"));
        HeadLinkModel model = new  HeadLinkModel();
        model.setIsshow(isshow);
        model.setId(id);
        MainPageService service = new MainPageServiceImpl();
        service.updateIsshowHeadLink(model);
    }
}
